﻿@inherits DemoWithResizableComponent

<div class="demo-description" id="ReadOnly">
    <h2><DemoNavLink Link="DateEdit#ReadOnly" />Date Edit - Read-Only Mode</h2>
    <p>
        <a class="helplink" target="_blank" href="https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxDateEdit-1">Date Edit</a> allows you to display the value, but does not allow users to change it.
        Set the <a class="helplink" target="_blank" href="https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxDateEdit-1.ReadOnly">ReadOnly</a> property to <b>true</b> to activate the read-only mode.
    </p>
</div>

<div class="card demo-card demo-card-shadow">
    <div class="card-header">
        <DemoToolbar @bind-SelectedSize="SizeMode" Title="The date cannot be changed" />
    </div>
    <div class="card-body mw-480">
        <DxDateEdit @bind-Date="@DateTimeValue"
                    ReadOnly="true"
                    SizeMode="SizeMode"></DxDateEdit>
    </div>
</div>

<CodeSnippet_Editor_DateEdit_ReadOnly/>

@code {
    DateTime DateTimeValue { get; set; } = DateTime.Now;
}
